<?php /*a:1:{s:71:"/www/wwwroot/qt.feifeiyu.club/app/admin/view/category/category_edit.vue";i:1691200332;}*/ ?>
<div class="el-dialog">
    <header class="el-dialog__header">
        <span  class="el-dialog__title">修改栏目</span>
        <button  data-bs-dismiss="modal" aria-label="Close" class="el-dialog__headerbtn" type="button">
            <i class="el-icon el-dialog__close">
                <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
                    <path fill="currentColor" d="M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"></path>
                </svg>
            </i>
        </button>
    </header>
    <!--顶部-->
     <form method="post" onsubmit="return post_add(this,'<?php echo url('edit'); ?>')">
            <!--内容-->
            <div class="layui-tab layui-tab-brief">
                <ul class="layui-tab-title">
                    <li class="layui-this">基本设置</li>
                    <li>模板设置</li>
                    <li>其他设置</li></ul>
                <div class="layui-tab-content" style="padding: 0;">
                    <div class="layui-tab-item layui-show">
                        <div class="el-dialog__body" style="padding: calc(0px + 10px) 20px;">
                            <!--开始-->
                            <div class="mb-3 row">
                                <label class="col-sm-2 col-form-label">上级</label>
                                <div class="col-sm-10">
                                    <select class="form-select" name="parentid" aria-label="请选择上级栏目">
                                        <option value="0">作为顶级栏目</option>
                                        <?php if(is_array($cate) || $cate instanceof \think\Collection || $cate instanceof \think\Paginator): $i = 0; $__LIST__ = $cate;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                                        <option value="<?php echo htmlentities($vo['id']); ?>" <?php if($find['parentid']==$vo['id']): ?>selected<?php endif; ?>><?php echo htmlentities($vo['catname']); ?></option><?php endforeach; endif; else: echo "" ;endif; ?></select></div>
                            </div>
                            <!--结束-->
                            <!--开始-->
                            <div class="mb-3 row">
                                <label class="col-sm-2 col-form-label">名称</label>
                                <div class="col-sm-10">
                                    <input type="text" name="catname" value="<?php echo htmlentities($find['catname']); ?>" class="form-control" placeholder="请输入栏目名称"></div>
                            </div>
                            <!--结束-->
                            <!--开始-->
                            <div class="mb-3 row">
                                <label class="col-sm-2 col-form-label">图片</label>
                                <div class="col-sm-10 input-group mb-3" style="width: 83.33333333%;">
                                    <input type="text" id="catimg" name="catimg" value="<?php echo htmlentities($find['catimg']); ?>" class="form-control" placeholder="请输入栏目图片">
                                    <button onclick="qh_open('图片管理','<?php echo url('attachment/add',['name'=>'catimg']); ?>',700,500)" class="el-button el-button--primary" type="button">上传</button></div>
                            </div>
                            <!--结束-->
                            <!--开始-->
                            <?php if($find['type']==3): ?>
                            <div class="mb-3 row">
                                <label class="col-sm-2 col-form-label">链接</label>
                                <div class="col-sm-10">
                                    <input type="text" name="pclink" value="<?php echo htmlentities($find['pclink']); ?>" class="form-control" placeholder="请输入链接地址"></div>
                            </div>
                            <?php endif; ?>
                            <!--结束-->
                            <div class="mb-3 row">
                                <label class="col-form-label col-sm-2 pt-0">打开</label>
                                <div class="col-sm-10 dis-jus">
                                    <div class="form-check">
                                        <input class="form-check-input" <?php if($find['target']): ?>checked=""<?php endif; ?>  type="radio" name="target" value="1" id="target">
                                        <label class="form-check-label" for="target">新窗口</label></div>
                                    <div class="form-check">
                                        <input class="form-check-input" <?php if(!$find['target']): ?>checked=""<?php endif; ?> type="radio" name="target" value="0" id="target1">
                                        <label class="form-check-label" for="target1">本窗口</label></div>
                                </div>
                            </div>
                            <!--结束-->
                            <div class="mb-3 row">
                                <label class="col-form-label col-sm-2 pt-0">显示</label>
                                <div class="col-sm-10 dis-jus">
                                    <div class="form-check">
                                        <input class="form-check-input" <?php if($find['display']): ?>checked=""<?php endif; ?> type="radio" name="display" value="1" id="display">
                                        <label class="form-check-label" for="display">显示</label></div>
                                    <div class="form-check">
                                        <input class="form-check-input" <?php if(!$find['display']): ?>checked=""<?php endif; ?> type="radio" name="display" value="0" id="display1">
                                        <label class="form-check-label" for="display1">不显示</label></div>
                                </div>
                            </div>
                            <!--结束-->
                            <!--结束-->
                            <?php if($find['type']==1): ?>
                            <div class="mb-3 row">
                                <label class="col-form-label col-sm-2 pt-0">投稿</label>
                                <div class="col-sm-10 dis-jus">
                                    <div class="form-check">
                                        <input class="form-check-input" <?php if($find['member_publish']): ?>checked=""<?php endif; ?> type="radio" name="member_publish" value="1" id="member_publish">
                                        <label class="form-check-label" for="member_publish">打开投稿</label></div>
                                    <div class="form-check">
                                        <input class="form-check-input" <?php if(!$find['member_publish']): ?>checked=""<?php endif; ?> type="radio" name="member_publish" value="0" id="member_publish1">
                                        <label class="form-check-label" for="member_publish1">关闭投稿</label></div>
                                </div>
                            </div>
                            <?php endif; ?>
                            <!--结束--></div>
                    </div>
                    <div class="layui-tab-item">
                        <div class="el-dialog__body" style="padding: calc(0px + 10px) 20px;">
                            <?php if($find['type']==1): ?>
                            <!--开始-->
                            <div class="mb-3 row">
                                <label class="col-sm-2 col-form-label">列表</label>
                                <div class="col-sm-10">
                                    <select class="form-select" name="list_template" aria-label="请选择列表模板">
                                        <option value="">请选择列表模板</option><?php if(is_array($template['list']) || $template['list'] instanceof \think\Collection || $template['list'] instanceof \think\Paginator): $i = 0; $__LIST__ = $template['list'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$list): $mod = ($i % 2 );++$i;?>
                                        <option value="<?php echo str_replace(strrchr($list, '.'),'',$list); ?>" <?php if($find['list_template']==str_replace(strrchr($list, '.'),'',$list)): ?>selected<?php endif; ?>><?php echo htmlentities($list); ?></option><?php endforeach; endif; else: echo "" ;endif; ?></select></div>
                            </div>
                            <!--结束-->
                            <!--开始-->
                            <div class="mb-3 row">
                                <label class="col-sm-2 col-form-label">内容</label>
                                <div class="col-sm-10">
                                    <select class="form-select" name="show_template">
                                        <option value="">请选择内容模板</option><?php if(is_array($template['show']) || $template['show'] instanceof \think\Collection || $template['show'] instanceof \think\Paginator): $i = 0; $__LIST__ = $template['show'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$list): $mod = ($i % 2 );++$i;?>
                                        <option value="<?php echo str_replace(strrchr($list, '.'),'',$list); ?>" <?php if($find['show_template']==str_replace(strrchr($list, '.'),'',$list)): ?>selected<?php endif; ?>><?php echo htmlentities($list); ?></option><?php endforeach; endif; else: echo "" ;endif; ?></select></div>
                            </div>
                            <!--结束-->
                             <?php endif; ?>
                            <!--开始-->
                            <?php if($find['type']==2): ?>
                            <div class="mb-3 row">
                                <label class="col-sm-2 col-form-label">单页</label>
                                <div class="col-sm-10">
                                    <select class="form-select" name="category_template">
                                        <option value="">请选择单页模板</option><?php if(is_array($template['page']) || $template['page'] instanceof \think\Collection || $template['page'] instanceof \think\Paginator): $i = 0; $__LIST__ = $template['page'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$list): $mod = ($i % 2 );++$i;?>
                                        <option value="<?php echo str_replace(strrchr($list, '.'),'',$list); ?>" <?php if($find['category_template']==str_replace(strrchr($list, '.'),'',$list)): ?>selected<?php endif; ?>><?php echo htmlentities($list); ?></option><?php endforeach; endif; else: echo "" ;endif; ?></select></div>
                            </div>
                            <!--结束-->
                            <?php endif; ?>
                            </div>
                    </div>
                    <div class="layui-tab-item">
                        <div class="el-dialog__body" style="padding: calc(0px + 10px) 20px;">
                            <!--开始-->
                            <div class="mb-3 row">
                                <label class="col-sm-2 col-form-label">标题</label>
                                <div class="col-sm-10">
                                    <input type="text" name="seo_title" value="<?php echo htmlentities($find['seo_title']); ?>" class="form-control" placeholder="请输入seo标题"></div>
                            </div>
                            <!--结束-->
                            <!--开始-->
                            <div class="mb-3 row">
                                <label class="col-sm-2 col-form-label">关键词</label>
                                <div class="col-sm-10">
                                    <input type="text" name="seo_keywords" value="<?php echo htmlentities($find['seo_keywords']); ?>" class="form-control" placeholder="请输入seo关键词"></div>
                            </div>
                            <!--结束-->
                            <!--开始-->
                            <div class="mb-3 row">
                                <label class="col-sm-2 col-form-label">描述</label>
                                <div class="col-sm-10">
                                    <textarea type="text" name="seo_description"  class="form-control" placeholder="请输入SEO描述"><?php echo htmlentities($find['seo_description']); ?></textarea>
                                </div>
                            </div>
                            <!--结束-->
                            <!--开始-->
                            <div class="mb-3 row">
                                <label class="col-sm-2 col-form-label">排序</label>
                                <div class="col-sm-10">
                                    <input type="number" value="<?php echo htmlentities($find['listorder']); ?>" name="listorder" class="form-control" placeholder="请输入数字"></div>
                            </div>
                            <!--结束--></div>
                    </div>
                    <!--tab分类结束--></div>
            </div>
          <input type="hidden" name="__token__" value="<?php echo token(); ?>" />
          <input type="hidden" name="type" value="<?php echo htmlentities($find['type']); ?>" />
          <input type="hidden" name="id" value="<?php echo htmlentities($find['id']); ?>" />
         <!--内容-->
    
    <!--底部-->
    <footer class="el-dialog__footer">
        <span class="dialog-footer">
            <button  type="button" class="el-button el-button--danger" data-bs-dismiss="modal" aria-label="Close">
                <span class="">取消</span></button>
            <button class="el-button el-button--primary" aria-disabled="false" type="submit">
                <span class="">确认</span></button>
        </span>
    </footer>
    </form>
</div>